﻿using Runtime.Services.Battle;
using Runtime.Services.Battle.Entity;
using Runtime.Services.BattleRecord;

namespace Runtime.Services.BattleAttack {

    /// <summary>
    /// 战斗攻击目标
    /// </summary>
    public interface IDFR_BattleAttackTarget : IDFR_BattleMapPositionProvider {

        IDFR_BattleAttackDefender AsAttackDefender();

        /// <summary>
        /// 受到攻击代理
        /// </summary>
        /// <param name="damage">伤害</param>
        public delegate void UnderattackDelegate(IDFR_BattleAttackDamage damage);

        /// <summary>
        /// 受到攻击事件
        /// </summary>
        event UnderattackDelegate Underattack;

        /// <summary>
        /// 实例ID
        /// </summary>
        DFR_BattleEntityInstanceID EntityInstanceID { get; }

        /// <summary>
        /// 受到攻击
        /// </summary>
        /// <param name="damage">伤害</param>
        /// <returns>是否是有效伤害，有效伤害会被计入统计</returns>
        bool DoUnderattack(IDFR_BattleAttackDamage damage, out IDFR_BattleRecordService.KillType killType);

        /// <summary>
        /// 是否是Boss
        /// </summary>
        bool IsBoss { get; }

        /// <summary>
        /// 是否是精英或Boss
        /// </summary>
        bool IsEliteOrBoss { get; }
    }
}
